<div class="easyui-panel" title="" style="width:436px">
    <div style="padding:10px 60px 10px 60px">

        <table cellpadding="5">
            <tr>
                <td>热门词汇:</td>
                <td><input id="keyword" class="easyui-textbox" type="text"
                           name="keyword" data-options="required:true"
                           value="<{$keyword['keyword']}>"/></td>
            </tr>
            <tr>
                <td>排序:</td>
                <td><input id="order" class="easyui-textbox" type="text"
                           name="order" data-options="required:true"
                           value="<{$keyword['order']}>"/></td>
            </tr>



        </table>
        <input id="id"  type="hidden"
               name="id" value="<{$keyword['id']}>"/>
        <td><a href="javascript:void(0)" class="easyui-linkbutton" onclick="update_keyword()">提交</a></td>


    </div>
</div>
<script>
    function update_keyword(){
        var id = $("#id").val();
        var keyword = $("#keyword").val();
        var order = $("#order").val();


        if(keyword==null || keyword == ""){
            alert("请填热门词汇！");
        }else{
            $.ajax({
                url:'<{:U('Keyword/keywordEdit')}>',
                type: 'POST',
                data: {
                        id:id,
                        keyword:keyword,
                        order:order
                },
                timeout: 3000,
                success: function (data) {
                    alert(data);
                    keywordKeywordRefresh();
                    $('#keyword_keywordlist_edit_dialog').dialog('close');
                },
                async: false
            });

        }
    }
</script>